<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>骑手之家</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../layui/css/layui.css"  media="all">
</head>
<body>
<script src="../../jQuery/jquery-3.6.0.js"></script>
<script src="../../layui/layui.js" charset="utf-8"></script>
<ul class="layui-nav">
    <li class="layui-nav-item">
        <a href="./ownorder.html">个人中心<span class="layui-badge-dot"></span></a>
    </li>
    <li class="layui-nav-item">
        <a href=""><img src="" class="layui-nav-img">我</a>
        <dl class="layui-nav-child">
            <dd><a href="../homeUser.html">主页</a></dd>
            <dd><a href="./../homePage.html">我的信息</a></dd>
            <dd></dd>
        </dl>
    </li>
</ul>
<div>
    <i class="layui-icon layui-icon-face-smile" >邮箱<b id="id"></b></i><br/>
    <i class="layui-icon layui-icon-face-smile" >身份证号码<b id="idNumber"></b></i><br/>
    <i class="layui-icon layui-icon-face-smile" >当前收入<b id="income"></b></i><br/>
    <i class="layui-icon layui-icon-face-smile" >当前接单数<b id="currentOrdersFinished"></b></i><br/>
    <i class="layui-icon layui-icon-face-smile" >当前完成单数<b id="currentOrdersReceived"></b></i><br/>
</div>





<script>
    $(function (){
        var orderform = JSON.parse(localStorage.getItem("username"))
        if (orderform != null){
            riderId = orderform.username
        }
        $.ajax({
            type:"post",
            url:"/order/riderHome",
            dataType:'json',
            data:{ 'riderId': riderId },
            success :function(result){
                localStorage.setItem("data",result.data)
                document.getElementById("id").innerHTML = result.data.id
                document.getElementById("currentOrdersReceived").innerHTML = result.data.currentOrdersReceived
                document.getElementById("currentOrdersFinished").innerHTML = result.data.currentOrdersFinished
                document.getElementById("income").innerHTML = result.data.income
                document.getElementById("idNumber").innerHTML = result.data.idNumber
            }
        })
    })
</script>

</body>
</html>